﻿/* Author: Achim Schnell */

using System.Collections.Generic;

namespace AppFx.Tokenization
{
    /// <summary>
    /// Creates tokens out of an expression.
    /// </summary>
    public interface ITokenizer : IList<IVerifier>
    {
        /// <summary>
        /// Gets the unprocessed part of the tokenizers buffer.
        /// </summary>
        /// <returns>The buffered expression.</returns>
        string GetBuffer();

        /// <summary>
        /// Get's a list of all currently parsed tokens.
        /// </summary>
        /// <returns></returns>
        IEnumerable<IToken> GetCurrentTokens();

        /// <summary>
        /// Parses the expression.
        /// </summary>
        /// <param name="expression">Expression to parse.</param>
        /// <returns>A list of parsed tokens.</returns>
        IEnumerable<IToken> Tokenize(string expression);
    }
}
